<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
 * Generic controller for entity class, CI AR.
 * @author hmQuan
 *
 */
class Tag extends MY_Controller {
	function __construct(){
		parent::__construct();
		$this->load->model('t_tag');
	}

	public function update(){
		$this->load->model('t_category');

		$arrCate = $this->t_category->get_all();
		foreach ($arrCate as $key => $value) {
			# code...
			// var_dump($value[CATEGORY_NAME]);
			// var_dump($value[CATEGORY_DESCRIPTION]);
			$this->t_tag->set_data(array(TAG_TAGNAME => $value[CATEGORY_NAME], TAG_TAGDESCRIPTION => $value[CATEGORY_DESCRIPTION]));
		};
	}
}